package com.service.scheduling;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * <dl>
 * <dt>back-end</dt>
 * <dd>Description:</dd>
 * <dd>Copyright: Copyright (C) 2015</dd>
 * <dd>Company: </dd>
 * <dd>CreateDate: 2019年07月27日</dd>
 * </dl>
 *
 * @author
 */
@Slf4j
@EnableScheduling
@ServletComponentScan
@SpringBootApplication
@ComponentScan("com.service.scheduling.*")
@EnableTransactionManagement
@MapperScan("com.service.*.mapper")
public class SchedulingApplication implements CommandLineRunner {

    public static void main(String[] args) {
        log.info("定时任务启动");
        SpringApplication.run(SchedulingApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        Thread.currentThread().join();
    }
}
